export default (connection: any, username: any, password: any) => {
  return new Promise((resolve, reject) => {
    connection.query("select * from menu_info order by useSerial", [], (err: any, results: any) => {
      if (err) {
        reject({
          code: 500,
          msg: "查询数据库时出错"
        })
      } else {
        resolve(results);
      }
    })
  })
}